package com.clannad.educms.controller;


import com.clannad.commonutils.R;
import com.clannad.educms.entity.CrmBanner;
import com.clannad.educms.service.CrmBannerService;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 首页banner表 前端控制器
 * </p>
 *
 * @author clannad
 * @since 2022-08-16
 */
@RestController
@RequestMapping("/educms/bannerFront")
//@CrossOrigin
public class BannerFrontController {
    @Autowired
    CrmBannerService crmBannerService;

    @GetMapping("getAllBanner")
    public R getAllBanner(){
        System.out.println("getAllBanner");
        List<CrmBanner> list=crmBannerService.selectAllBanner();
        return R.ok().data("list",list);
    }


}

